home *** CD-ROM | disk | FTP | other *** search
/ Champak 99 / (Vol 99) Jan 19 2010.iso / Games / balls.swf / scripts / DefineSprite_19 / frame_1 / DoAction.as
Encoding:
Text File  |  2010-01-19  |  747 b   |  37 lines

  1. glow = new flash.filters.GlowFilter(0,80,3,3,1,3,false,false);
  2. this.filters = [glow];
  3. vb = 0;
  4. Tblur = 3;
  5. blur = 3;
  6. this.onRollOver = function()
  7. {
  8.    Tblur = 8;
  9.    if(_root._currentframe == 1)
  10.    {
  11.       shoot();
  12.    }
  13. };
  14. this.onRollOut = function()
  15. {
  16.    Tblur = 3;
  17. };
  18. this.onPress = function()
  19. {
  20.    Tblur = 5;
  21. };
  22. this.onReleaseOutside = function()
  23. {
  24.    Tblur = 3;
  25. };
  26. this.onEnterFrame = function()
  27. {
  28.    d = this.Tblur - this.blur;
  29.    this.vb += d / 1.5;
  30.    this.blur += vb;
  31.    this.vb *= 0.5;
  32.    this.glow.blurX = this.glow.blurY = this.blur;
  33.    this.glow.strength = 2 / Math.sqrt(this.blur);
  34.    _parent.internal.filters = [this.glow];
  35.    _parent.internal._xscale = _parent.internal._yscale = 100 + blur - 4;
  36. };
  37.